import request from '@/utils/request.js'

/**
 * 获取学生信息
 * @param {*} params 
 * @returns 
 */
export function listStudents(params) {
    return request({
        url: "/student/list",
        method: "GET",
        params,
        isToken: true
    })
}


/**
 * 删除学生
 * @param {*} params 
 * @returns 
 */
export function delStudents(stuId) {
    return request({
        url: `/student/${stuId}`,
        method: "DELETE",
    })
}


/**
 * 添加学生
 * @param {*} data 
 * @returns 
 */
export function addStudents(data) {
    return request({
        url: "/student",
        method: "POST",
        data,
    })
}


/**
 * 修改学生信息
 * @param {*} data 
 * @returns 
 */
export function updateStudents(data) {
    return request({
        url: "/student",
        method: "PUT",
        data,
        isToken:true
    })
}